package com.egoonet.domain;

import lombok.Data;
import org.hibernate.annotations.Immutable;
import org.hibernate.annotations.Subselect;

import javax.persistence.Entity;
import javax.persistence.Id;

/**
 *
 * Created by wchi on 2017/4/21.
 */
@Entity
@Immutable
@Data
@Subselect("select p.id,p.title,p.isdn,u.email,u.userName from post p left join user u on p.creator_id=u.id")
public class PostUser {
    @Id
    private String id;
    private String title;
    private Integer isdn;
    private String email;
    private String userName;
}
